<template>
  <div class="global_bg">
    <VantNavigationBar title="编辑信息"></VantNavigationBar>
    <van-cell-group inset class="mt10">
      <van-cell title="头像" is-link :src="userInfo.user_image" />
      <van-cell title="性别" is-link :value="userInfo.gender" />
      <van-cell title="用户名" is-link :value="userInfo.user_name" />
    </van-cell-group>
  </div>
</template>
<script>
import { Cell, CellGroup } from 'vant'
import VantNavigationBar from '@/components/Navbar'
import mine from '@/api/mine'
import { ref } from 'vue'
export default {
  components: {
    VantNavigationBar,
    [Cell.name]: Cell,
    [CellGroup.naem]: CellGroup,
  },
  setup() {
    const userInfo = ref({})

    mine.getuserInfoApi().then((res) => {
      if (res.status === 200 && res.data) {
        userInfo.value = res.data
      }
    })
    return {
      userInfo,
    }
  },
}
</script>
<style></style>
